<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My Vue</title>
  </head>
  <body>
    <div id="app">
      <h3>test app</h3>
      <p>name:{{name}}</p>
      地址:
      <div v-text="addres.country"></div>
      <div v-html="addres.city"></div>
    </div>

    <script src="./lib/reactive.js"></script>
    <script src="./lib/compile.js"></script>
    <script src="./lib/my-vue.js"></script>

    <script>
      const vm = new MyVue({
        data: {
          name: 'aaaa',
          addres: {
            country: 'china',
            city: 'shenzhen',
          },
        },
        el: '#app',
      });

      setTimeout(() => {
        vm.name = 'bbb';

      }, 2000);
    </script>
  </body>
</html>
